/**
 * 字典项 点 状态 
 * @author xiaoxujs
 * @date 2023-11-17
 */
import { FC } from "react";
import { FenpeiStatus } from "./style";
import { Tooltip, Typography } from "antd";

const { Text } = Typography;

/**
 * 
 * dianColor 颜色
 * text 文本
 * isCancel 是否删除线 
 * isTooltip 是否有提示
 * tooltipText 提示文本
 */
const DictionaryItemStyleModule: FC<{
    dianColor: string;
    text?: string
    isCancel?: boolean;
    isTooltip?: boolean;
    tooltipText?: string;
}> = ({
    dianColor,
    isCancel,
    text,
    isTooltip,
    tooltipText
}) => {
        return <FenpeiStatus $color={dianColor}>
            <div className='dian'></div>
            <div>
                {
                    isTooltip ? <Tooltip title={tooltipText}>
                        <Text delete={isCancel} >{text}</Text>
                    </Tooltip> : <Text delete={isCancel} >{text}</Text>
                }

            </div>
        </FenpeiStatus>
    }

export default DictionaryItemStyleModule;